package ch9.thread3;

public class Zhoubapi {

	public static void main(String[] args) {
		Worker w = new Worker("杨白劳");
		w.start();
		Thread.currentThread().setName("黄世仁");
		while (true) {
			try {
				Thread.sleep(3000);
				w.interrupt();// 喊工人干活
			} catch (InterruptedException e) {
				// TODO 自动生成的 catch 块
				e.printStackTrace();
			}

		}
	}

}
